/**
 * jims
 */
package com.jims.master.modules.drug.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.drug.entity.DrugStorageDept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 药品库存单位字典表DAO接口
 * @author DT
 */
@MyBatisDao
public interface DrugStorageDeptDao extends CrudDao<DrugStorageDept> {

    /**
     * 自动补全查询
     * @param drugStorageDept
     * @param q
     * @return
     * @author ZHUQ
     */
    public List<DrugStorageDept> findAutoCompleteList(@Param("drugStorageDept")DrugStorageDept drugStorageDept, @Param("q") String q,@Param("limit")String limit);

    /**
     * 自动补全查询
     * @param drugStorageDept
     * @param q
     * @return
     * @author ZHUQ
     */
    public List<DrugStorageDept> findAutoCompleteBySupplier(DrugStorageDept drugStorageDept, @Param("q") String q,@Param("limit")String limit);


    /**
     * 根据库房名称查询库房信息(库房翻译)
     * @param storageName
     * @return
     * @author fengyg
     */
    public List<DrugStorageDept> getByName(@Param("storageName")String storageName,@Param("orgId")String orgId);

    /**
     * 根据科室ID查询库房信息
     * @param storageCode 库房表drug_storage_dept的storageCode,是科室表org_dept的ID
     * @return
     * @author fengyg
     */
    public DrugStorageDept getByStorageCode(@Param("storageCode")String storageCode);
}